home *** CD-ROM | disk | FTP | other *** search
- Path: news.microsoft.com!news
- From: a-cnadc@microsoft.com (Dann Corbit)
- Newsgroups: comp.lang.c
- Subject: Re: Finding a prime number
- Date: 8 Feb 1996 19:55:08 GMT
- Organization: Microsoft Corporation
- Message-ID: <4fdkes$bnl@news.microsoft.com>
- References: <4e875s$nqk@reader2.ix.netcom.com> <7c8_9601301722@tor250.org> <4f7n1o$ol9@mother.usf.edu>
- NNTP-Posting-Host: 157.57.171.202
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.14
-
- In article <4f7n1o$ol9@mother.usf.edu>, yatesc@csee.usf.edu says...
- { snip }
- >Here is code that does not take a long time to start up and tests
- >for primes in the range of unsigned long integers. The longest
- >I've seen it run is for about 3 seconds when finding a prime
- >around 1 billion:
- { code snip }
-
- I have a routine that will find primes for 64 bit integers.
- It is 500 lines, and not very portable (it requires 64 bit
- integers)
-
- I have a different routine that finds primes for numbers
- up to long double size.
-
- If anyone wants a copy, send mail to a-cnadc@microsoft.com
- and I'll forward you a copy of either or both.
- --
- The opinions expressed in this message are my own personal views
- and do not reflect the official views of Microsoft Corporation.
-
-